package com.lanqiao.config;

import com.lanqiao.test.A5;
import com.lanqiao.test.A6;
import com.lanqiao.test.LanqiaoPrinter;
import com.lanqiao.test.Paper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = "com.lanqiao")
public class Config {
    @Bean
    public LanqiaoPrinter lanqiaoPrinter(Paper a5){
        LanqiaoPrinter lanqiaoPrinter = new LanqiaoPrinter();
        lanqiaoPrinter.setPaper(a5);
        return lanqiaoPrinter;
    }

    @Bean
    public A5 a5(){return new A5();}

    @Bean
    public A6 a6(){return new A6();
    }
}
